/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sadec;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
import java.sql.*;
import javax.swing.JOptionPane;


/**
 * 
 *
 * @author RULBER
 */

public class Main {
    public static Connection conexion;
    public static Statement s ;
    
    public static void main(String[] args) {
        // TODO code application logic here
        try{
            MysqlDataSource dataSource = new MysqlDataSource();
            dataSource.setUser("root");
            dataSource.setPassword("root");
            dataSource.setDatabaseName("bd_sadec");
            dataSource.setServerName("localhost");
            conexion = dataSource.getConnection();
            s = conexion.createStatement();
            logueo.main(args);

        }
        catch(Exception error){
            JOptionPane.showMessageDialog(null,"Error en la Conexión a la Base de Datos... Comuniquese con su administrador...","SADEC",JOptionPane.HEIGHT);
        }

    }
}
